﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using MKAdminCore.Controllers;
using MKAdminCore.ToolKit.Config;

namespace MKAdminCore.Areas.Communicate.Controllers
{
    [Area("Communicate")]
    [Route("Communicate/[controller]/[action]")]
    public class ChatController : BaseMvcController
    {
        public IActionResult Index()
        {
            return View(PageViewFilesConfig.CommunicateChatIndex);
        }

        [HttpGet]
        public new IActionResult GetUserInfo()
        {
            var userInfo = base.GetUserInfo();

            var loginInfo = new
            {
                userId = userInfo.OperatorId,
                userType = userInfo.OperatorId == 10 ? 1 : 0
            };

            return Ok(loginInfo);
        }
    }
}